import React from 'react'
import {useRef,useEffect} from "react"
import Fun2 from './fun2' // 被高阶组件包裹住的组件
function Fun1() {
   let myref = useRef(null)
    useEffect(()=>{ // 相当于类组件得componentDidmounted
        console.log(myref.current);
    },[])
  return (
    <div>
        <span ref={myref}>2001c</span>
        <Fun2 send="zhaozhihao"></Fun2>
    </div>
  )
}

export default Fun1